<template>
	<view class="content poRel">
		<view class="hei20"></view>
		<view class="wid90 mar borRad20" style="background: #00C82D;height: 214rpx;">
			<view class="wid90 mar">
				<view class="hei86 dis disAl disJuB coFFF" style="border-bottom: 1rpx solid #fff;">
					<view class="foSi30 fowe600">查询时间</view>
					<picker mode="date" :value="date" :end="end" @change="bindDateChange">
						<view class="dis disAl">
							<view class="foSi25 mar-right10">{{date?date:'请选择'}}</view>
							<uni-icons type="right" color="#fff" size="30rpx"></uni-icons>
						</view>
					</picker>
				</view>
				<view class="dis disAl" style="justify-content: space-around;height: 126rpx;">
					<view class="textCen coFFF">
						<view class="foSi30" style="line-height: 44rpx;">¥0</view>
						<view class="foSi20">累计佣金</view>
					</view>
					<view class="textCen coFFF">
						<view class="foSi30" style="line-height: 44rpx;">0</view>
						<view class="foSi20">累计积分</view>
					</view>
				</view>
			</view>
		</view>
		<scroll-view style="height: calc(100vh - 234rpx);" class="wid100" scroll-y="true" @scrolltolower="lower">
			<view style="height: 10rpx;"></view>
			<wsj v-if="list.length == 0" zs='0'></wsj>
			<block v-for="(item,index) in list" :key="index">
				<view class="mar-top30 wid90 mar bacFFF borRad20" style="padding: 40rpx 0;">
					<view class="wid90 mar">
						<view class="dis disAl disJuB foSi30">
							<view class="fowe600 ">储值返佣</view>
							<view style="color: #00C82D;">¥10.00</view>
						</view>
						<view class="dis disAl disJuB mar-top20">
							<view class="foSi25" style="color: #737373;">2024-06-26 10:00</view>
							<view class="foSi30" style="color: #00C82D;">0积分</view>
						</view>
					</view>
				</view>
			</block>
			<view style="height: 50rpx;"></view>
		</scroll-view>
	</view>
</template>

<script>
	import wsj from '../common/w_sj.vue'
	export default {
		components: {
			wsj
		},
		data() {
			return {
				url: this.global.url,
				timer: null,
				sousuo: '',
				xuan: 0,
				last_page: 0,
				page: 1,
				list: ['',''],
				date: '',
				end: ''
			}
		},
		onLoad() {
			this.end = this.dateFormat()
		},
		methods: {
			dateFormat(time) {
				let date = new Date();
				let year = date.getFullYear();
				// 在日期格式中，月份是从0开始的，因此要加0，使用三元表达式在小于10的前面加0，以达到格式统一  如 09:11:05
				let month = date.getMonth() + 1 < 10 ? "0" + (date.getMonth() + 1) : date.getMonth() + 1;
				let day = date.getDate() < 10 ? "0" + date.getDate() : date.getDate();
				let hours = date.getHours() < 10 ? "0" + date.getHours() : date.getHours();
				let minutes = date.getMinutes() < 10 ? "0" + date.getMinutes() : date.getMinutes();
				let seconds = date.getSeconds() < 10 ? "0" + date.getSeconds() : date.getSeconds();
				// 拼接
				// return year+"-"+month;
				return year + "-" + month + "-" + day;
			},
			bindDateChange: function(e) {
				this.date = e.detail.value
			},
			lower(e) {
				if(this.last_page > this.page){
					this.page++
					this.getList()
				}
			},
			getList(){
				
			},
			tiaozhuan(url) {
				uni.navigateTo({
					url: url
				})
			}
		}
	}
</script>

<style>
	.content {
		min-height: 100vh;
		background-color: #F3F1F1;
	}
	.xia{
		height: 1rpx;
		background-color: #E5E5E5;
	}
	.butt1{
		width: 120rpx;
		height: 42rpx;
		color: #8A8A8A;
		border: 1rpx solid #8A8A8A;
		border-radius: 8rpx;
	}
	.butt2{
		width: 120rpx;
		height: 42rpx;
		background-color: #00AD27;
		border: 1rpx solid #00AD27;
		border-radius: 8rpx;
	}
</style>